package com.atguigu.gulimall.search.vo;

import com.atguigu.gulimall.common.to.es.SkuEsModel;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: xuesm
 * @date: 2025/1/5 21:52
 */
@Data
public class SearchResult {

    /**
     * 查询到的所有商品信息
     */
    private List<SkuEsModel> products;

    // 分页信息
    private Integer pageNum;
    private Long total;
    private Integer totalPages;
    private List<Integer> pageNavs;

    /**
     * 当前查到的结果，所有涉及到的品牌
     */
    private List<BrandVo> brands;
    @Data
    public static class BrandVo {
        private Long brandId;
        private String brandName;
        private String brandImg;
    }

    /**
     * 当前查到的结果， 所有涉及的分类
     */
    private List<CatalogVo> catalogs;
    @Data
    public static class CatalogVo {
        private Long catalogId;
        private String catalogName;
    }

    /**
     * 当前查到的结果，所有涉及的属性
     */
    private List<AttrVo> attrs = new ArrayList<>();
    @Data
    public static class AttrVo{
        private Long attrId;
        private String attrName;
        private List<String> attrValue;
    }

    // 面包屑导航
    private List<NavVo> navs = new ArrayList<>();
    @Data
    public static class NavVo{
        private String navName;
        private String navValue;
        private String link;
    }

    private List<Long> attrIds = new ArrayList<>();
}
